from sklearn.linear_model import ElasticNet
from my_models.base import Base


class ElasticNetRegressor(Base):

    def __init__(self):

        # import ipdb;ipdb.set_trace();
        self.regressor = ElasticNet(alpha=0.1, l1_ratio=0.5)

    def train(self, x_train, y_train):
        self.clf = self.regressor.fit(x_train, y_train)

    def valid(self, x_test, y_test):
        score_c = self.clf.score(x_test, y_test)
        print( "ElasticNetRegressor:{}".format(score_c))

    def save_model(self, save_path):
        pass

    def load_model(self, model_path):
        pass
